package com.yihu.cms.service;

import java.io.IOException;

import com.yihu.dataService.hessian.resource.ResourceMongoDBManager;
import com.yihu.web.bean.order.Order;
import com.yihu.web.bean.vo.OrderQuery;
import com.yihu.web.dataService.hessian.interfaceService.OrderHService;


public class OrderService{
	OrderHService service = null;
	public OrderService(){
		try {
			service= (OrderHService)ResourceMongoDBManager
					.getSingleton().getBeans("orderHSC");
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	public Object findByPage(OrderQuery query){
		return service.findByPage(query);
	}
	
	public Object getById(String id){
		return service.get(id);
	}

	public Object updateOrder(Order order){
		return service.updateOrder(order);
	}
	
	public Object addOrder(Order order){
		return service.add(order);
	}
	
	public Object changeState(Order order){
		return service.changeState(order);
	}
	
	
}
